package com.diandi.signature.enums.platfrom;

/**
 * 系统枚举
 * Created by Administrator on 2017/6/27.
 */
public enum SysModelType {


    秒借系统("system_mj","MJ","秒借系统"),
    账务系统("system_zw","ZW","账务系统"),
    理财系统("system_lc","LC","理财系统"),
    催收系统("system_cs","CS","催收系统"),

    ;
    private String type;
    private String tradeNoType;
    private String typeName;

    SysModelType(String type, String tradeNoType, String typeName) {
        this.type = type;
        this.tradeNoType = tradeNoType;
        this.typeName = typeName;
    }

    public String getTradeNoType() {
        return tradeNoType;
    }

    public void setTradeNoType(String tradeNoType) {
        this.tradeNoType = tradeNoType;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static SysModelType getEmun(String type){
        for (SysModelType sinaIntefaceType : SysModelType.values()) {
            if(sinaIntefaceType.getType().equals(type)){
                return sinaIntefaceType;
            }
        }
        return null;
    }

    public static SysModelType getByTradeNoType(String tradeNoType){
        for (SysModelType sinaIntefaceType : SysModelType.values()) {
            if(sinaIntefaceType.getTradeNoType().equals(tradeNoType)){
                return sinaIntefaceType;
            }
        }
        return null;
    }
}
